package C11_2_PullUpMethod.after_refactor;

import java.util.Date;

/**
 * 顾客
 */
public abstract class Customer {
    protected Date lastBillDate;

    void addBill(Date date, double amount){

    }

    void createBill(Date date) {
        double chargeAmount = chargeFor(lastBillDate, date);
        addBill(date, chargeAmount);
    }

    abstract double chargeFor(Date start, Date end);

}
